package com.hducms.cms.service;

import javax.servlet.http.HttpServletRequest;

import com.hducms.cms.entity.main.CmsLog;
import com.hducms.cms.entity.main.CmsUser;
import com.hducms.common.page.Pagination;

public interface CmsLogService {
	public Pagination getPage(Integer category,
			String username, String title, String ip, int pageNo, int pageSize);

	public CmsLog findById(Integer id);

	public CmsLog operating(HttpServletRequest request, String title,
			String content);

	/**
	 * 登陆失败日志记录
	 * @param request
	 * @param title
	 * @param content
	 * @return
	 */
	public CmsLog loginFailure(HttpServletRequest request, String title,
			String content);

	/**
	 * 登陆成功日志记录
	 * @param request
	 * @param user
	 * @param title
	 * @return
	 */
	public CmsLog loginSuccess(HttpServletRequest request, CmsUser user,
			String title);

	/**
	 * 新增一条日志
	 * @param bean
	 * @return
	 */
	public CmsLog save(CmsLog bean);

	public CmsLog deleteById(Integer id);

	public CmsLog[] deleteByIds(Integer[] ids);
//
//	public int deleteBatch(Integer category, Integer siteId, Integer days);
}